package com.cloud.wyf.ExceptionHandler;

import com.cloud.wyf.Entity.Message;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

//@RestControllerAdvice
public class MyExcepetionExhandler {

    @ExceptionHandler(Exception.class)
    public Message doException(Exception e){
        System.out.println(e.getMessage());
        System.out.println(e.fillInStackTrace());
        return Message.failure(400,e.getMessage());
    }
}
